/************************************************************************
 *File Name: dir.c
 *Author: wky
 *Created Time: 2023年06月23日 星期五 09时22分40秒
 *Describtion:mkdir rmdir remove 
 ************************************************************************/
#include "client.h"
#include <strings.h>

int Mkdir(int sockfd)
{
    train_t train;
    bzero(&train, sizeof(train));

    recv(sockfd,&train.length, sizeof(int),0 );
    if(train.length == 0)
    {
        return 0;
    }
    else
    {
        recv(sockfd,train.data, train.length ,0);
        printf("%s\n",train.data);

    }
}

int Rmdir(int sockfd)
{
    train_t train;
    bzero(&train, sizeof(train));

    recv(sockfd,&train.length, sizeof(int),0 );
    if(train.length == 0)
    {
        return 0;
    }
    else
    {
        recv(sockfd,train.data, train.length ,0);
        printf("%s\n",train.data);

    }
}

int Remove(int sockfd)
{
    train_t train;
    bzero(&train, sizeof(train));

    recv(sockfd,&train.length, sizeof(int),0 );
    if(train.length == 0)
    {
        return 0;
    }
    else
    {
        recv(sockfd,train.data, train.length ,0);
        printf("%s\n",train.data);

    }
}

